<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue Component</title>
</head>
<body>

<div id="app">

<!--    组件: 传递给组件中的值: props-->
    <nexora v-for="item in items" v-bind:element="item"></nexora>

</div>

<script src="https://unpkg.com/vue@2.5.21/dist/vue.min.js"></script>
<script>

    // 定义一个vue组件
    Vue.component("nexora",{
        props:['element'],
        template: '<li>{{ element }}</li>'
    });

    var vm = new Vue({
        el: '#app',
        data:{
            items:["java","python","golang"]
        }
    });

</script>

</body>
</html>